using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;
using System.Configuration;
using System.IO;
using System.Xml;
using System.Diagnostics;
using System.Reflection;
using System.Collections.ObjectModel;
using System.Security;
using System.Globalization;

namespace Microsoft.Office.Project.EPMAuditing.Library
{

    [XmlRootAttribute("EPMAuditingConfig", Namespace = "", IsNullable = false)]
    public class EPMAuditingConfig
    {
        [XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public string SchemaVersion;

        [XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public int ThreadOperationTimeoutSeconds;

        [XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public int WakeupIntervalSeconds;

        [XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public string NetAuditingServerIP;

        [XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public int NetAuditingServerPort;

        [XmlArrayAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public Collection<Listener> Listeners;
        
    }

    public class Listener
    {
        [XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public string ClassName;

        [XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public string DLL;

        [XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public bool Enabled;

        [XmlArrayAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public Collection<Arg> Args;

        [XmlIgnore]
        public object objectRef;
    }

    public class Arg
    {
        [XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public string Name;

        [XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public string Value;

    }

}
